from unittest import TestCase

from algo.graphs import get_larger_cut


def case_1():
    return [1, 1]


def case_2():
    return [0, 0, 0, 0, 0]


class TestGraphs(TestCase):
    def test_get_larger_min_cut_empty(self):
        min_cut1 = []
        min_cut2 = []
        modifer = 0
        expected = None
        result = get_larger_cut(min_cut1, min_cut2, modifer)
        self.assertEqual(result, expected)

    def test_get_larger_min_cut_a1(self):
        min_cut1 = case_1()
        min_cut2 = case_2()
        modifer = 0
        expected = min_cut1
        result = get_larger_cut(min_cut1, min_cut2, modifer)
        self.assertEqual(result, expected)

    def test_get_larger_min_cut_b2(self):
        min_cut1 = case_1()
        min_cut2 = case_2()
        modifer = 1
        expected = min_cut2
        result = get_larger_cut(min_cut1, min_cut2, modifer)
        self.assertEqual(result, expected)
